Skip to content

refactor(cli): group global actions - #2988

Merged
cv merged 87 commits into
mainfrom
refactor/layer-global-actions
May 6, 2026
Merged

refactor(cli): group global actions#2988
cv merged 87 commits into
mainfrom
refactor/layer-global-actions

Conversation

@cv

@cv cv commented May 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Move top-level/global workflow action modules into src/lib/actions/** so command adapters call a visible action layer instead of flat src/lib modules.

Stack Navigation

Changes

  • Moved deploy, maintenance, onboarding facade, root help, upgrade-sandboxes, and global action facade modules under src/lib/actions/.
  • Moved the global action facade test with the module.
  • Updated command adapters, root bootstrap, integration tests, and callers to the new paths.
  • Kept behavior unchanged; this PR is a structural move plus import updates.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Verification

  • npx prek run --all-files --stage pre-push passes
  • npm run build:cli
  • npm run typecheck:cli
  • npx tsx scripts/check-layer-import-boundaries.ts
  • Global command/action targeted tests pass
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • make docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Carlos Villela cvillela@nvidia.com

Summary by CodeRabbit

  • Refactor
    • Internal reorganization of CLI action module structure for improved code organization and maintainability.

cv added 30 commits May 2, 2026 13:36
@wscurran wscurran added NemoClaw CLI refactor PR restructures code without intended behavior change labels May 4, 2026
@cv
cv requested a review from prekshivyas May 5, 2026 00:27
@cv cv added the v0.0.35 label May 5, 2026
@prekshivyas prekshivyas self-assigned this May 5, 2026
@cjagwani cjagwani assigned cjagwani and unassigned cjagwani May 5, 2026
@ericksoa ericksoa added v0.0.36 and removed v0.0.35 labels May 6, 2026
@cv

cv commented May 6, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

cv added a commit that referenced this pull request May 6, 2026
## Summary
Move sandbox-scoped workflow action modules into
`src/lib/actions/sandbox/**` so command adapters and sandbox workflow
orchestration have separate, visible layers.

## Stack Navigation
- Position: 57 of 60
- Previous PR: [#2986 — test(cli): enforce initial layer import
boundaries](#2986)
- Next PR: [#2988 — refactor(cli): group global
actions](#2988)

## Changes
- Moved sandbox
connect/destroy/rebuild/status/logs/doctor/gateway-state/process-recovery/skill/snapshot
actions under `src/lib/actions/sandbox/`.
- Moved sandbox policy/channel action helpers under
`src/lib/actions/sandbox/policy-channel.ts`.
- Updated command adapters, runtime dispatch facade, tests, and
remaining callers to the new paths.
- Kept behavior unchanged; this PR is a structural move plus import
updates.

## Type of Change
- [x] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Verification
- [x] `npx prek run --all-files --stage pre-push` passes
- [x] `npm run build:cli`
- [x] `npm run typecheck:cli`
- [x] `npx tsx scripts/check-layer-import-boundaries.ts`
- [x] Sandbox command adapter targeted tests pass
- [x] No secrets, API keys, or credentials committed
- [ ] Docs updated for user-facing behavior changes
- [ ] `make docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the style guide (doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
Signed-off-by: Carlos Villela <cvillela@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Enhanced sandbox cleanup during destruction to properly unload Ollama
models, terminate proxy processes, and stop host services for complete
resource cleanup.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv
cv marked this pull request as ready for review May 6, 2026 16:26
@cv
cv changed the base branch from refactor/layer-sandbox-actions to main May 6, 2026 16:26
@cv
cv enabled auto-merge (squash) May 6, 2026 16:26

@prekshivyas prekshivyas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Same #2984/#2985-pattern PR — pure file-organization, 26 files / +64 / -64.

Six action modules (deploy, global + test, maintenance, onboard, root-help, upgrade-sandboxes) moved under src/lib/actions/. The +N/-N on moved files reflects their internal imports shifting. 19 consumer files (commands, nemoclaw.ts, tests) have one-line import-path updates.

Verification checklist explicitly cites running check-layer-import-boundaries.ts from #2986 — strong signal nothing escapes the new layer rules.

CI: pr.yaml mostly green (lint/dco/check-hash/legacy-path-guard/changes PASS); CodeRabbit SUCCESS; macos-e2e/wsl-e2e/checks + pr-self-hosted builds still in flight at review time. No failures.

@cv
cv merged commit aaf1f1a into main May 6, 2026
13 checks passed
cv added a commit that referenced this pull request May 6, 2026
## Summary
Move registry, config, path, gateway, session, and sandbox persistence
modules into `src/lib/state/**` so persistence boundaries are visible in
paths.

## Stack Navigation
- Position: 59 of 60
- Previous PR: [#2988 — refactor(cli): group global
actions](#2988)
- Next PR: [#2991 — refactor(cli): group docker
adapters](#2991)

## Changes
- Moved registry/config/path/gateway/session/sandbox state modules under
`src/lib/state/`.
- Moved co-located state tests and updated dist/source paths in
integration tests.
- Updated action, command, onboarding, policy, service, and test imports
to the new state paths.
- Updated CodeRabbit path instructions and migrated-path guard canonical
paths for moved state modules.
- Kept behavior unchanged; this PR is a structural move plus import
updates.

## Type of Change
- [x] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Verification
- [x] `npx prek run --all-files --stage pre-push` passes
- [x] `npm run build:cli`
- [x] `npm run typecheck:cli`
- [x] `npx tsx scripts/check-layer-import-boundaries.ts`
- [x] State and registry targeted tests pass
- [x] No secrets, API keys, or credentials committed
- [ ] Docs updated for user-facing behavior changes
- [ ] `make docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the style guide (doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
Signed-off-by: Carlos Villela <cvillela@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Reorganized internal state management modules into a dedicated
directory structure to improve code organization and maintainability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv
cv deleted the refactor/layer-global-actions branch May 27, 2026 21:17
@wscurran wscurran added area: cli Command line interface, flags, terminal UX, or output and removed NemoClaw CLI labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Command line interface, flags, terminal UX, or output refactor PR restructures code without intended behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants